#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@file:import2.py
@time:2016/10/31 0031 17:50
"""
def getfunctionbyname(module_name,function_name):
    module = __import__(module_name)
    return getattr(module,function_name)
print repr(getfunctionbyname("dumbdbm","open"))
